﻿using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace EOM.TSHotelManagement.Common.Contract
{
    public class HumanResourcesOutputDto : BaseOutputDto
    {
        [JsonPropertyName("totalEmployees")]
        public int TotalEmployees { get; set; }

        [JsonPropertyName("totalDepartments")]
        public int TotalDepartments { get; set; }

        [JsonPropertyName("attendance")]
        [Required]
        public TempAttendanceRecord Attendance { get; set; }
    }

    public class TempAttendanceRecord
    {
        [JsonPropertyName("present")]
        public int Present { get; set; }

        [JsonPropertyName("late")]
        public int Late { get; set; }

        [JsonPropertyName("absent")]
        public int Absent { get; set; }

        [JsonIgnore]
        public int TotalAttendance => Present + Late;
    }
}
